<?php

//this page delete everything in the database... for testing .


require_once("lib/db.lib.php");
require_once("lib/user.lib.php");
require_once("lib/game.lib.php");

db_connect();

mysql_query("TRUNCATE TABLE `game_dealt_waterlevel`") or die(mysql_error());
mysql_query("TRUNCATE TABLE `player_dealt_hand`") or die(mysql_error());
mysql_query("TRUNCATE TABLE `player_recv_waterlevel`") or die(mysql_error());
mysql_query("TRUNCATE TABLE `game_has_user`") or die(mysql_error());
mysql_query("TRUNCATE TABLE `user_session`") or die(mysql_error());
mysql_query("TRUNCATE TABLE `table_info`") or die(mysql_error());
mysql_query("TRUNCATE TABLE `game_info`") or die(mysql_error());
mysql_query("TRUNCATE TABLE `user_info`") or die(mysql_error());




//add some user
user_add_new_user("qwe1", "qwe");
user_add_new_user("qwe2", "qwe");
user_add_new_user("qwe3", "qwe");
user_add_new_user("qwe4", "qwe");
user_add_new_user("qwe5", "qwe");
user_add_new_user("qwe6", "qwe");
user_add_new_user("qwe7", "qwe");
user_add_new_user("qwe8", "qwe");
user_add_new_user("qwe9", "qwe");
user_add_new_user("qwe10", "qwe");


//init table
table_initialize();


//user sit
table_sit_down(1,1,1);
table_sit_down(1,2,2);
table_sit_down(1,3,3);
table_sit_down(1,4,4);

//make new game
game_make_new(1);



echo "done.";


